package com.qishon.pc.domain.model;

import lombok.Data;

/**
 * Created by yuquan.hu on 2016/12/23.
 */
@Data
public class ProgressSteps {
    private int id;
    private int girardId;
    private String stepNo;
    private String stepName;
    private int allFiles;
    private int completedFiles;
    private float ratio;

    public float getRatio() {
        return allFiles == 0 ? 0 : (completedFiles > allFiles ? 1.0f : completedFiles * 14.28f / (allFiles * 1.0f));
    }
}
